package com.ruoyi.slope.ai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.ai.mapper.SlopeAiRockfallDebrisRecognitionMapper;
import com.ruoyi.slope.ai.domain.SlopeAiRockfallDebrisRecognition;
import com.ruoyi.slope.ai.service.ISlopeAiRockfallDebrisRecognitionService;

/**
 * 边坡落石及碎落目标识别Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeAiRockfallDebrisRecognitionServiceImpl implements ISlopeAiRockfallDebrisRecognitionService 
{
    @Autowired
    private SlopeAiRockfallDebrisRecognitionMapper slopeAiRockfallDebrisRecognitionMapper;

    /**
     * 查询边坡落石及碎落目标识别
     * 
     * @param id 边坡落石及碎落目标识别主键
     * @return 边坡落石及碎落目标识别
     */
    @Override
    public SlopeAiRockfallDebrisRecognition selectSlopeAiRockfallDebrisRecognitionById(Long id)
    {
        return slopeAiRockfallDebrisRecognitionMapper.selectSlopeAiRockfallDebrisRecognitionById(id);
    }

    /**
     * 查询边坡落石及碎落目标识别列表
     * 
     * @param slopeAiRockfallDebrisRecognition 边坡落石及碎落目标识别
     * @return 边坡落石及碎落目标识别
     */
    @Override
    public List<SlopeAiRockfallDebrisRecognition> selectSlopeAiRockfallDebrisRecognitionList(SlopeAiRockfallDebrisRecognition slopeAiRockfallDebrisRecognition)
    {
        return slopeAiRockfallDebrisRecognitionMapper.selectSlopeAiRockfallDebrisRecognitionList(slopeAiRockfallDebrisRecognition);
    }

    /**
     * 新增边坡落石及碎落目标识别
     * 
     * @param slopeAiRockfallDebrisRecognition 边坡落石及碎落目标识别
     * @return 结果
     */
    @Override
    public int insertSlopeAiRockfallDebrisRecognition(SlopeAiRockfallDebrisRecognition slopeAiRockfallDebrisRecognition)
    {
        slopeAiRockfallDebrisRecognition.setCreateTime(DateUtils.getNowDate());
        return slopeAiRockfallDebrisRecognitionMapper.insertSlopeAiRockfallDebrisRecognition(slopeAiRockfallDebrisRecognition);
    }

    /**
     * 修改边坡落石及碎落目标识别
     * 
     * @param slopeAiRockfallDebrisRecognition 边坡落石及碎落目标识别
     * @return 结果
     */
    @Override
    public int updateSlopeAiRockfallDebrisRecognition(SlopeAiRockfallDebrisRecognition slopeAiRockfallDebrisRecognition)
    {
        slopeAiRockfallDebrisRecognition.setUpdateTime(DateUtils.getNowDate());
        return slopeAiRockfallDebrisRecognitionMapper.updateSlopeAiRockfallDebrisRecognition(slopeAiRockfallDebrisRecognition);
    }

    /**
     * 批量删除边坡落石及碎落目标识别
     * 
     * @param ids 需要删除的边坡落石及碎落目标识别主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiRockfallDebrisRecognitionByIds(Long[] ids)
    {
        return slopeAiRockfallDebrisRecognitionMapper.deleteSlopeAiRockfallDebrisRecognitionByIds(ids);
    }

    /**
     * 删除边坡落石及碎落目标识别信息
     * 
     * @param id 边坡落石及碎落目标识别主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiRockfallDebrisRecognitionById(Long id)
    {
        return slopeAiRockfallDebrisRecognitionMapper.deleteSlopeAiRockfallDebrisRecognitionById(id);
    }
}
